#!/usr/bin/node

const log = console.log,
      err = console.error;

const usr = process.argv[2],
      len = process.argv.length;

if(len!==3){
  err('命令行格式：cmd base64_string');
  process.exit(1);
}

const buf = new Buffer(usr,'base64');
const info = buf.toString('utf8').split(':');

if(info.length!==2){
  err('error!');
  process.exit(2);
}

log(`username:${info[0]},password:${info[1]}`);
